<template>
  <el-input-number v-model="value" @change="change"></el-input-number>
</template>

<script>
export default {
  props: {
    radius: {
      type: Number,
      default: 0
    }
  },
  data(){
    return{
      value:''
    }
  },
  // computed: {
  //   value() {
  //     return this.radius / 1000;
  //   }
  // },
  watch: {
    radius() {
      this.value = this.radius / 1000;
    }
  },
  created() {
     this.value = this.radius / 1000;
  },
  methods: {
    change(e) {
      this.$emit("change",e)
      console.log(e);
    }
  }
};
</script>

<style></style>
